From: Kim F. Storm Date: Mon, 17 May 2004 22:49:26 +0000 (+0000) Subject: (face_at_buffer_position): Use GET_OVERLAYS_AT. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~22422 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=feb2161a60fb3e22f529790bdb6eca86dae49398;p=emacs.git (face_at_buffer_position): Use GET_OVERLAYS_AT. --- diff --git a/src/xfaces.c b/src/xfaces.c index ac44f3317ce..2bd3f31d6ea 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -7297,24 +7297,8 @@ face_at_buffer_position (w, pos, region_beg, region_end, /* Look at properties from overlays. */ { int next_overlay; - int len; - - /* First try with room for 40 overlays. */ - len = 40; - overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); - noverlays = overlays_at (pos, 0, &overlay_vec, &len, - &next_overlay, NULL, 0); - - /* If there are more than 40, make enough space for all, and try - again. */ - if (noverlays > len) - { - len = noverlays; - overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); - noverlays = overlays_at (pos, 0, &overlay_vec, &len, - &next_overlay, NULL, 0); - } + GET_OVERLAYS_AT (pos, overlay_vec, noverlays, &next_overlay, 0); if (next_overlay < endpos) endpos = next_overlay; }